﻿using UnityEngine.UI;
using UnityEngine;

public class Button_Exit : CButton
{
    private SceneController sceneController;

    protected override void Awake()
    {
        base.Awake();
        sceneController = Service.Get<SceneController>();
    }

    protected override void OnClick()
    {
        if (sceneController.Index == SceneController.Index_Boot)
        {
            sceneController.Quit();
        }
        else
        {
            sceneController.RetuenToMenu();
        }
    }
}
